Quadric Error Metrics (QEM) is a method by which a mesh can be simplified, reducing the number of edges, and thereby vertices and faces, while attempting to maintain the overall shape of the mesh. The resulting reduction in geometry while maintaining shape is perfect for rendering objects at a distance, where the full complexity of a model is generally lost given the limited number of pixels that can actually be used to represent the model. My implementation of QEM takes in a simply defined .m file containing vertex points and face vertex indices (both 1 indexed) and displays the mesh onto the screen. The mouse or WASD keys will rotate the camera around the model and the spacebar proceeds to the next collapse.
I supplied manifold (1 ring) checking that would reject edges that had the potential to generate shark fins, but the rejection rates were high enough that a model became unreduceable at roughly 25% of the original vertices. As a result I added the option of turning it off through the use of the '\' key. The user can also swap between the reduced mesh and the original with the 'z' key.

Here are some simplification examples:





This Quadric Error Metrics Program was the work of Clovas Hansen for the Winter 2011 quarter of CSC/CPE 572. It was an augmentation of existing code to read and display a mesh and made use of a Matrix inversion technique that was attributed directly in the code.